﻿--[[
   @brief    descprtion: contact_list_control
   @author   perpu
   @version  1.0
   @date     2016-06-15
--]]

contact_list_desc = 
{
    module_name = "contact_list",
    events = 
    {
        {
            c_event = 
            {
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST,
                    callback = "contact_list_view.on_get_group_list_done"
                },
            },
            lua_event = 
            {
                {
                    id = social_event.SOCIAL_PANEL_POSITION_CHANGED,
                    callback = "contact_list_view.on_social_panel_pos_changed"
                },
                {
                    id = social_event.CLICK_SOCIAL_CONTACT_TAB_BTN,
                    callback = "contact_list_view.click_on_contact_tab"
                },
                {
                    id = social_event.SOCIAL_FRIEND_COUNT_CHANGE,
                    callback = "contact_list_view.on_friend_or_group_count_change"
                },
                {
                    id = social_event.SOCIAL_GROUP_COUNT_CHANGE,
                    callback = "contact_list_view.on_friend_or_group_count_change"
                },
                {
                    id = social_event.SOCIAL_TIPS_SHOW,
                    callback = "contact_list_view.on_social_tips_show"
                },
--                {
--                    id = mainframe_event.MINI_WINDOW_POSITION_CHANGE,
--                    callback = "contact_list_view.on_mini_mode_position_changed"
--                },
            },
            listen_broadcast =
            {
                {
                    id = "i_broadcast_social_mainwnd_show",
                    callback = "contact_list_view.on_social_mainwnd_show"
                },
            },
            reg_service = 
            {
                {
                    id = 'i_service_social_pannel_open_friend_list',
                    callback = 'contact_list_view.open_friend_list'
                },
                {
                    id = 'i_service_social_pannel_get_current_show_list',
                    callback = 'contact_list_view.get_current_show_list'
                },
            },
            lua_file = "social\\contact_list\\view.lua"
        },
        {
            c_event = 
            {

            },
            lua_event = 
            {
                {
                    id  = mainframe_event.CHANGE_MAINFRAME_MODE,
                    callback = "contact_list_control.on_mode_load_change"
                },
                {
                    id = social_event.GET_RECOMMENT_GROUP_SUCCESS,
                    callback = "contact_list_control.get_recomment_group_success"
                },
            },
            lua_file = "social\\contact_list\\control.lua"
        },

        {
            c_event = 
            {
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_FRIEND_LIST,
                    callback = "contact_message_list_control.on_get_friend_list_done"
                },
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST,
                    callback = "contact_message_list_control.on_get_group_list_done"
                },
            },
            lua_event = 
            {
                {
                    id  = mainframe_event.CHANGE_MAINFRAME_MODE,
                    callback = "contact_message_list_control.on_mode_load_change"
                },
                {
                    id  = mainframe_event.CHANGE_MAINFRAME_MODE,
                    callback = "session_vlist_control.on_mode_load_change"
                },
            },
            reg_service = 
            {
                {
                    id = 'i_service_get_contact_msg_list',
                    callback = "contact_message_list_control.get_contact_msg_list"
                },
            },
            lua_file = "social\\contact_list\\contact_message_list_control.lua"
        },
        {
            c_event = 
            {
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_MY_SOCIAL_TEST_INFO,
                    callback = "test_user_control.on_get_social_test_info_done"
                },
            },
            lua_event = 
            {

            },
            lua_file = "social\\contact_list\\test_user_mgr.lua"
        },
        {
            c_event = 
            {         
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_FRIEND_LIST,
                    callback = "contact_menu_control.on_get_friend_list_done"
                },       
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST,
                    callback = "contact_menu_control.on_get_group_list_done"
                },        
            },
            lua_event = 
            {
            },
            reg_service =
            {
                {
                    id = 'i_service_social_pannel_bottom_menu_show_reddot',
                    callback = "contact_menu_control.show_reddot"
                },
            },
            lua_file = "social\\contact_list\\contact_menu.lua"
        },

        {
            c_event = 
            {     
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_FRIEND_LIST_ERROR,
                    callback = "retry_get_list_mgr.on_get_fiend_list_error"
                },   
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST_ERROR,
                    callback = "retry_get_list_mgr.on_get_group_list_error"
                },            
            },
            lua_event = 
            {
            },
            lua_file = "social\\contact_list\\retry_get_list_mgr.lua"
        },
    },
}

 desc_mgr.add(contact_list_desc);
 ierd_tgp.tpf_ui.Require("social\\contact_list\\control.lua");
 ierd_tgp.tpf_ui.Require("social\\contact_list\\contact_menu.lua");
 ierd_tgp.tpf_ui.Require("social\\contact_list\\view.lua");
 ierd_tgp.tpf_ui.Require("social\\contact_list\\contact_message_list_control.lua");
 ierd_tgp.tpf_ui.Require("social\\contact_list\\retry_get_list_mgr.lua");
